﻿using System;

namespace Axial.jQuery
{
	public class Offset
	{
		public int left { get; private set; }
		public int top { get; private set; }
	}

	public static partial class JQuery
    {
        public static JQueryVar jQuery(string name) { return new JQueryVar(name); }
		public static JQueryVar jQuery(JQueryVar var) { return var; }
		public static JQueryVar Document { get { return new JQueryVar("document"); } }
		public static JQueryVar Window { get { return new JQueryVar("document"); } }
		public static void get(string page, string data, Action callback) { }
        public static void get(string page, string data, Action<object> callback) { }
		public static JQueryVar This { get { return new JQueryVar("this"); } }
	}

    public partial class JQueryVar
    {
		public JQueryVar(string name) { }
        public JQueryVar show() { return this; }
        public JQueryVar html(string html) { return this; }
		public string html() { return default(string);  }
		public JQueryVar parent() { return this; }
		public JQueryVar children(string selector) { return this; }
		public JQueryVar children() { return this; }
		public void each(Action callback) { }
		public void each(Action<int> callback) { }

		public Offset offset() { return null; }

		public string css(string property) { return "cssvalue"; }
		public JQueryVar css(string property, string value) { return this; }
		public JQueryVar css(string property, double value) { return this; }
		public string attr(string property) { return "cssvalue"; }
		public JQueryVar attr(string property, string value) { return this; }
		public JQueryVar attr(string property, double value) { return this; }

		public double width() { return default(int); }
		public JQueryVar width(double width) { return this; }
		public double height() { return default(int); }
		public JQueryVar height(double width) { return this; }

		public JQueryVar append(JQueryVar a) { return this; }
		public JQueryVar appendTo(JQueryVar a) { return this; }
		public JQueryVar prepend(JQueryVar a) { return this; }
		public JQueryVar prependTo(JQueryVar a) { return this; }
		public JQueryVar after(JQueryVar a) { return this; }
		public JQueryVar before(JQueryVar a) { return this; }
		public JQueryVar insertAfter(JQueryVar a) { return this; }
		public JQueryVar insertBefore(JQueryVar a) { return this; }
	
		public JQueryVar addClass(string className) { return this; }
		public JQueryVar removeClass(string className) { return this; }
		public JQueryVar toggleClass(string className) { return this; }

		public Axial.DOM.Element this[int index] { get { return null; } }

		public JQueryVar mousemove(Action callback) { return this; }
		public JQueryVar mousemove(Action<DOM.Event, bool> callback) { return this; }
		public JQueryVar mousemove(Func<DOM.Event, bool> callback) { return this; }
		public JQueryVar mouseup(Action callback) { return this; }
		public JQueryVar mouseup(Action<DOM.Event> callback) { return this; }
		public JQueryVar mouseup(Func<DOM.Event, bool> callback) { return this; }
		public JQueryVar mousedown(Action callback) { return this; }
		public JQueryVar mousedown(Action<DOM.Event> callback) { return this; }
		public JQueryVar mousedown(Func<DOM.Event, bool> callback) { return this; }
		public JQueryVar click(Action callback) { return this; }
		public JQueryVar click(Action<DOM.Event> callback) { return this; }
		public JQueryVar click(Func<DOM.Event, bool> callback) { return this; }
		public void ready(Action callback) { }
	}
}
